/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.h;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public class g {
    private static SharedPreferences a = null;
    private static SharedPreferences b = null;

    public static void a(Context paramContext, String paramString) {
        SharedPreferences.Editor localEditor = e(paramContext).edit();
        localEditor.putString("memory_password_key", paramString);
        localEditor.commit();
    }

    public static String a(Context paramContext) {
        return e(paramContext).getString("memory_password_key", null);
    }

    public static void b(Context paramContext, String paramString) {
        SharedPreferences.Editor localEditor = e(paramContext).edit();
        localEditor.putString("memory_username_key", paramString);
        localEditor.commit();
    }

    public static String b(Context paramContext) {
        return e(paramContext).getString("qihoo_login_service_curruser", null);
    }

    public static void c(Context paramContext, String paramString) {
        SharedPreferences.Editor localEditor = e(paramContext).edit();
        localEditor.putString("qihoo_login_service_curruser", paramString);
        localEditor.commit();
    }

    public static String c(Context paramContext) {
        return e(paramContext).getString("memory_username_key", null);
    }

    public static boolean d(Context paramContext) {
        return e(paramContext).getBoolean("user_experience_key", true);
    }

    private static SharedPreferences e(Context paramContext) {
        if (a == null)
            a = PreferenceManager.getDefaultSharedPreferences(paramContext);
        return a;
    }

    public static void a(Context paramContext, String paramString1, String paramString2) {
        SharedPreferences.Editor localEditor = e(paramContext).edit();
        localEditor.putString(paramString1, paramString2);
        localEditor.commit();
    }

    public static void a(Context paramContext, String paramString, int paramInt) {
        SharedPreferences.Editor localEditor = e(paramContext).edit();
        localEditor.putInt(paramString, paramInt);
        localEditor.commit();
    }

    public static String d(Context paramContext, String paramString) {
        return e(paramContext).getString(paramString, "");
    }

    public static int e(Context paramContext, String paramString) {
        return e(paramContext).getInt(paramString, 0);
    }

    private static SharedPreferences f(Context paramContext) {
        if (b == null)
            b = paramContext.getSharedPreferences("gamecenter_sdk_plugin_pre", 0);
        return b;
    }

    public static boolean f(Context paramContext, String paramString) {
        return f(paramContext).getBoolean(paramString, false);
    }

    public static void a(Context paramContext, String paramString, boolean paramBoolean) {
        SharedPreferences.Editor localEditor = f(paramContext).edit();
        localEditor.putBoolean(paramString, paramBoolean);
        localEditor.commit();
    }

    public static long g(Context paramContext, String paramString) {
        return f(paramContext).getLong(paramString, 0L);
    }

    public static void a(Context paramContext, String paramString, long paramLong) {
        SharedPreferences.Editor localEditor = f(paramContext).edit();
        localEditor.putLong(paramString, paramLong);
        localEditor.commit();
    }

    public static String h(Context paramContext, String paramString) {
        return f(paramContext).getString(paramString, null);
    }

    public static void b(Context paramContext, String paramString1, String paramString2) {
        SharedPreferences.Editor localEditor = f(paramContext).edit();
        localEditor.putString(paramString1, paramString2);
        localEditor.commit();
    }
}